package com.yyfax.ph.home.recommendloan.basicinfo;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created by laixj on 2017/1/23.
 * Copyright ©2017 www.yylending.com. All Rights Reserved.
 */
public class BasicInfoBean implements Parcelable, Cloneable {

	public String id;
	public String name;
	public String certId;
	public String phone;
	public String outletId;
	public String customerMgr;
	public String businessType;
	public List<String> imageIds;
	public String type;
	public String ethnicity;
	public String address;
	public String authority;
	public String validity;
	public String sex;
	public String certPhoto;

	public BasicInfoBean() {
	}

	public Object clone() {
		BasicInfoBean obj = null;
		try {
			obj = (BasicInfoBean) super.clone();
		} catch (CloneNotSupportedException e) {
			e.printStackTrace();
		}
		return obj;
	}

	@Override
	public String toString() {
		return "BasicInfoBean{" +
				"rcmdId='" + id + '\'' +
				", name='" + name + '\'' +
				", certId='" + certId + '\'' +
				", phone='" + phone + '\'' +
				", outletId='" + outletId + '\'' +
				", customerMgr='" + customerMgr + '\'' +
				", businessType='" + businessType + '\'' +
				", imageIds=" + imageIds +
				", type='" + type + '\'' +
				", ethnicity='" + ethnicity + '\'' +
				", address='" + address + '\'' +
				", authority='" + authority + '\'' +
				", validity='" + validity + '\'' +
				", sex='" + sex + '\'' +
				", certPhoto='" + certPhoto + '\'' +
				'}';
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(this.id);
		dest.writeString(this.name);
		dest.writeString(this.certId);
		dest.writeString(this.phone);
		dest.writeString(this.outletId);
		dest.writeString(this.customerMgr);
		dest.writeString(this.businessType);
		dest.writeStringList(this.imageIds);
		dest.writeString(this.type);
		dest.writeString(this.ethnicity);
		dest.writeString(this.address);
		dest.writeString(this.authority);
		dest.writeString(this.validity);
		dest.writeString(this.sex);
		dest.writeString(this.certPhoto);
	}

	protected BasicInfoBean(Parcel in) {
		this.id = in.readString();
		this.name = in.readString();
		this.certId = in.readString();
		this.phone = in.readString();
		this.outletId = in.readString();
		this.customerMgr = in.readString();
		this.businessType = in.readString();
		this.imageIds = in.createStringArrayList();
		this.type = in.readString();
		this.ethnicity = in.readString();
		this.address = in.readString();
		this.authority = in.readString();
		this.validity = in.readString();
		this.sex = in.readString();
		this.certPhoto = in.readString();
	}

	public static final Creator<BasicInfoBean> CREATOR = new Creator<BasicInfoBean>() {
		@Override
		public BasicInfoBean createFromParcel(Parcel source) {
			return new BasicInfoBean(source);
		}

		@Override
		public BasicInfoBean[] newArray(int size) {
			return new BasicInfoBean[size];
		}
	};
}